<template>
	<view class="item-box">
		<view class="item-title">
			<view>
				{{$utils.eliminate(item.carLicense)}}
			</view>
			<view :class="state == 1 ? 'urgent' : 'commonly'">{{item.appointmentStatus}}</view>
		</view>
		<view class="item-details" @click="$emit('boxClick',item)">
			<view class="message-item">
				<view class="message-title">客户姓名</view>
				<view class="message-detail">{{item.custName}}</view>
			</view>
			<view class="message-item">
				<view>电话号码</view>
				<view>{{item.custTel}}</view>
			</view>
			<view class="message-item">
				<view>质检时间</view>
				<view>{{item.preComeDate}}</view>
			</view><view class="message-item">
				<view>接车时间</view>
				<view>{{item.createdDate}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"listitem",
		props:{
			type:{type:String,default:'order'},
			item:{type:Object,default:()=>{}}
		},
		data() {
			return {
				state:1
			};
		}
	}
</script>

<style lang="scss">
.item-box{
	width: 100%;
	// height: 310upx;
	// border: 1px solid #000;
	margin-top: 32upx;
	padding: 0 32upx 32upx 32upx;
	background-color: #fff;
	.item-title{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding-top: 32upx;
		.urgent{
			color: rgb(246,71,47);
		}
		.commonly{
			color:rgb(153,153,153);
		}
		:first-child{
			font-size: 32upx;
		}
		:nth-child(2){
			font-size: 26upx;
		}
	}
	.item-details{
		height: 240upx;
		// border: 1px solid #000;
		margin-top: 8upx;
		background-color: rgb(249,250,254);
		padding: 18upx 32upx 24upx 32upx;
		display: flex;
		flex-direction: row;
		flex-wrap:wrap;
		margin-top: 32upx;
		.message-item{
			width: 50%;
			:first-child {
				font-size: 24upx;
				color:rgb(153,153,153);
				margin-top: 12upx;
			}
			:nth-child(2){				
				margin-top: 12upx;
			}			
		}
	}
}
</style>
